(function () {
    CLIENT_PROPS = {
        'screen.width': 'sw',
        'screen.height': 'sh',
        'screen.availWidth': 'saw',
        'screen.availHeight': 'sah',
        'window.outerWidth': 'wow',
        'window.outerHeight': 'woh',
        'window.innerWidth': 'wiw',
        'window.innerHeight': 'wih',
        'document.body.clientWidth': 'bcw',
        'document.body.clientHeight': 'bch',
        'document.body.offsetHeight': 'boh',
        'document.body.offsetWidth': 'bow',
        'window.orientation': 'wo',
        'window.devicePixelRatio': 'wdpo'
    };
    var overrideDevicePixelRatio = false;
    var value = '', propVal, sep = '';
    for (var prop in CLIENT_PROPS) {
        try {
            propVal = eval(prop);
            if (prop == 'window.devicePixelRatio' && overrideDevicePixelRatio) {
                propVal = '2';
            }
        } catch (e) {
            propVal = '0';
        }
        if (typeof propVal === 'undefined') { propVal = '-1' };
        value += sep + escape(prop) + '=' + escape(propVal);
        sep = '&';
    }
    /*var img=document.createElement('img');
    img.setAttribute('style','width:1px;height:1px;display:none');
    img.setAttribute('src','/client_props?'+value);
    */
    document.cookie = 'client_props=' + value + ';path=/';
})();